package cn.com.surker.enums.sale;

import cn.com.surker.enums.ICodeDescEnum;

/**
 * @Author lucky
 * @create 2024年06月25 9:17
 * @desc
 */
public enum ContractCategoryEnum implements ICodeDescEnum {
    ST(1,"商砼"), SJ(2,"砂浆"), SWC(3,"水稳层"),
    QQ(4,"全轻混凝土"), YZJ(5,"预制件合同");

    private final String description;

    private final Integer code;

    ContractCategoryEnum(Integer code, String description) {
        this.description = description;
        this.code = code;
    }

    public String getDescription() {
        return description;
    }

    public Integer getCode() {return code;}


    public static String getDescByCode(Integer code) {
        for (ContractCategoryEnum contractCategoryEnum : ContractCategoryEnum.values()) {
            if (contractCategoryEnum.getCode().equals(code)) {
                return contractCategoryEnum.getDescription();
            }
        }
        return null;
    }
}
